package com.example.foodtruckdemo.common;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 分页请求
 */
@Data
public class PageRequest {
    /**
     * 页码
     */
    @ApiModelProperty("页码")
    private int pageNo = 1;
    /**
     * 每页数
     */
    @ApiModelProperty("每页数")
    private int pageSize = 20;

    public Page toPage(){
        return new Page(pageNo,pageSize);
    }
}
